package com.yb.project.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yb.project.system.domain.SysUserRole;
import com.yb.project.system.mapper.SysUserRoleMapper;
import com.yb.project.system.service.SysUserRoleService;

@Service
public class SysUserRoleServiceImpl implements SysUserRoleService {
	
	@Autowired
	private SysUserRoleMapper sysUserRoleMapper;

	@Override
	public void insert(SysUserRole sysUserRole) {
		// TODO Auto-generated method stub
		sysUserRoleMapper.insert(sysUserRole);
	}

	@Override
	public void insertList(List<SysUserRole> sysUserRoleList) {
		// TODO Auto-generated method stub
		sysUserRoleMapper.insertList(sysUserRoleList);
	}

	@Override
	public void deleteByUserId(Long userId) {
		// TODO Auto-generated method stub
		sysUserRoleMapper.deleteByUserId(userId);
	}

	@Override
	public void deleteByUserIds(Long[] userIds) {
		// TODO Auto-generated method stub
		sysUserRoleMapper.deleteByUserIds(userIds);
	}

	@Override
	public void deleteByRoleId(Long roleId) {
		// TODO Auto-generated method stub
		sysUserRoleMapper.deleteByRoleId(roleId);
	}

	@Override
	public void deleteByRoleIds(Long[] roleIds) {
		// TODO Auto-generated method stub
		sysUserRoleMapper.deleteByRoleIds(roleIds);
	}

	@Override
	public List<Long> getRoleIdsByUserId(Long userId) {
		// TODO Auto-generated method stub
		return sysUserRoleMapper.getRoleIdsByUserId(userId);
	}

	@Override
	public List<Long> getMenuIdsByUserId(Long userId) {
		// TODO Auto-generated method stub
		return sysUserRoleMapper.getMenuIdsByUserId(userId);
	}
}